package asset

import (
	"base"
	"proto/asset"
	"proto/base"
	"test_client/logic/gate/response"
	. "test_client/logic/internal"
)

type assetService struct {
}

func init() {
	service := new(assetService)
	Service.Register(service)
}

func (*assetService) Name() string {
	return "proto_asset"
}

func (*assetService) OnTestAdd(msg *proto_asset.OnTestAdd, args *gate_response.Args) (err error) {
	code := args.ErrorCode
	if code == proto_base.ErrorCode_Success {
		base.Logger.Release("添加道具成功")
	}

	return
}

func (*assetService) OnTestRemove(msg *proto_asset.OnTestRemove, args *gate_response.Args) (err error) {
	code := args.ErrorCode
	if code == proto_base.ErrorCode_Success {
		base.Logger.Release("移除道具成功")
	}

	return
}
